<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
    <todo>
        <todo-title slot="todo-title" :title="title"></todo-title>
        <todo-items slot="todo-items" v-for="items in todoItems" :items="items"></todo-items>

    </todo>

</div>
<script src="../lib/vue.js"></script>
<script>
    Vue.component("todo", {
        template: '<div>\
                        <slot name="todo-title"></slot>\
                        <ul>\
                        <slot name="todo-items"></slot>\
                        </ul>\
                   <\div>'
    });
    Vue.component('todo-title', {
        props: ['title'],
        template: '<li>{{title}}</li>'
    })
    Vue.component('todo-items', {
        props: ['items'],
        template: '<li>{{items}}</li>'
    });
    new Vue({
        el: '#app',
        data: {
            title: 'zyd的course',
            todoItems: ['java', 'python', 'linux']
        }
    })

</script>
</body>
</html>